from django.contrib import admin
from django.urls import path, include
from django.views.generic import RedirectView
from rest_framework.documentation import include_docs_urls
from rest_framework_simplejwt.views import (
    TokenObtainPairView,
    TokenRefreshView,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', RedirectView.as_view(url='admin/')),
    path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('docs/', include_docs_urls(title='API文档')),
    path('silk/', include('silk.urls', namespace='silk')),
    path("borrow_logs/", include("borrow_logs.urls")),
    path("custom_user/", include("custom_user.urls")),
    path("pre_repair_logs/", include("pre_repair_logs.urls")),
    path("equipments/", include("equipments.urls")),
    path("equipment_categories/", include("equipment_categories.urls")),
    path("purchase_logs/", include("purchase_logs.urls")),
    path("repair_logs/", include("repair_logs.urls")),
]
